home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / lib / X11 / config / sv4Lib.rules < prev    next >
Encoding:
Text File  |  2006-12-20  |  6.4 KB  |  207 lines

  1. XCOMM $Xorg: sv4Lib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
  2.  
  3. /*
  4.  * SVR4 shared library rules
  5.  */
  6.  
  7. XCOMM $XFree86: xc/config/cf/sv4Lib.rules,v 3.8tsi Exp $
  8.  
  9. #ifndef HasSharedLibraries
  10. # define HasSharedLibraries YES
  11. #endif
  12. #ifndef SharedDataSeparation
  13. # define SharedDataSeparation NO
  14. #endif
  15. #ifndef HasGcc2ForCplusplus
  16. # define HasGcc2ForCplusplus HasGcc2
  17. #endif
  18. #ifndef SharedCodeDef
  19. # define SharedCodeDef /**/
  20. #endif
  21. #ifndef SharedLibraryDef
  22. # define SharedLibraryDef /**/
  23. #endif
  24. #ifndef ShLibIncludeFile
  25. # define ShLibIncludeFile <sv4Lib.tmpl>
  26. #endif
  27. #ifndef SharedLibraryLdCmd
  28. # define SharedLibraryLdCmd $(LD)
  29. #endif
  30. #ifndef SharedLibraryLoadFlags
  31. # define SharedLibraryLoadFlags -G -z text
  32. #endif
  33. #ifndef RpathLoadFlags
  34. #define RpathLoadFlags /**/
  35. #endif
  36. #ifndef LibraryRpathLoadFlags
  37. #define LibraryRpathLoadFlags RpathLoadFlags
  38. #endif
  39. #ifndef HardCodeLibdirFlag
  40. #define HardCodeLibdirFlag RpathLoadFlags
  41. #endif
  42. #ifndef PositionIndependentCFlags
  43. # if HasGcc2
  44. #  define PositionIndependentCFlags -fPIC
  45. # else
  46. #  define PositionIndependentCFlags -K PIC
  47. # endif
  48. #endif
  49. #ifndef PositionIndependentCplusplusFlags
  50. # if HasGcc2ForCplusplus
  51. #  define PositionIndependentCplusplusFlags -fPIC
  52. # else
  53. #  define PositionIndependentCplusplusFlags -K PIC
  54. # endif
  55. #endif
  56. #ifndef UseExportLists
  57. # define UseExportLists NO
  58. #endif
  59. #ifndef StripInstalledPrograms
  60. # define StripInstalledPrograms NO
  61. #endif
  62.  
  63. /*
  64.  * InstallSharedLibrary - generate rules to install the shared library.
  65.  */
  66. #ifndef InstallSharedLibrary
  67. #if StripInstalledPrograms
  68. # define InstallSharedLibrary(libname,rev,dest)                @@\
  69. install:: Concat(lib,libname.so.rev)                     @@\
  70.     MakeDir($(DESTDIR)dest)                        @@\
  71.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
  72.     mcs -d Concat($(DESTDIR)dest/lib,libname.so.rev)        @@\
  73.     @if $(SOSYMLINK); then (set -x; \                @@\
  74.       $(RM) Concat($(DESTDIR)dest/lib,libname.so); \        @@\
  75.       cd $(DESTDIR)dest; \                        @@\
  76.       $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)); fi
  77. #else
  78. # define InstallSharedLibrary(libname,rev,dest)                @@\
  79. install:: Concat(lib,libname.so.rev)                     @@\
  80.     MakeDir($(DESTDIR)dest)                        @@\
  81.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
  82.     @if $(SOSYMLINK); then (set -x; \                @@\
  83.       $(RM) Concat($(DESTDIR)dest/lib,libname.so); \        @@\
  84.       cd $(DESTDIR)dest; \                        @@\
  85.       $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)); fi
  86. #endif
  87.  
  88. #endif /* InstallSharedLibrary */
  89.  
  90. /*
  91.  * InstallSharedLibraryData - generate rules to install the shared library data
  92.  */
  93. #ifndef InstallSharedLibraryData
  94. # define InstallSharedLibraryData(libname,rev,dest)
  95. #endif /* InstallSharedLibraryData */
  96.  
  97. #ifndef LinkWithExports
  98. # if UseExportLists
  99. #  define LinkWithExports(libname,rev,solist,down,up) \
  100.     (cd down; $(CCENVSETUP) SharedLibraryLdCmd -o up/$@~ $(SHLIBLDFLAGS) -h $@ solist $(REQUIREDLIBS))    @@\
  101.     if [ -f Concat(lib,libname.elist) ]; then \            @@\
  102.         $(RM) down/$@.exports $@.list; \                @@\
  103.         $(CPP) $(ALLINCLUDES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES) Concat(lib,libname.elist) | CppSedMagic >$@.list; \    @@\
  104.         $(EXPORTLISTGEN) $@~ $@.list > down/$@.exports; \        @@\
  105.         (cd down; $(CCENVSETUP) SharedLibraryLdCmd -o up/$@~ $(SHLIBLDFLAGS) -h $@ ShlibExportListOpt($@.exports) solist $(REQUIREDLIBS)); \    @@\
  106.         $(RM) down/$@.exports $@.list; \                @@\
  107.     fi;
  108. # else
  109. #  define LinkWithExports(libname,rev,solist,down,up) \
  110.     (cd down; $(CCENVSETUP) SharedLibraryLdCmd -o up/$@~ $(SHLIBLDFLAGS) -h $@ solist $(REQUIREDLIBS))
  111. # endif
  112. #endif
  113.  
  114. /*
  115.  * SharedLibraryTarget - generate rules to create a shared library;
  116.  * build it into a different name so that we do not hose people by having
  117.  * the library gone for long periods.
  118.  */
  119. #ifndef SharedLibraryTarget
  120. # define SharedLibraryTarget(libname,rev,solist,down,up)        @@\
  121. AllTarget(Concat(lib,libname.so.rev))                    @@\
  122.                                     @@\
  123. Concat(lib,libname.so.rev):  solist $(EXTRALIBRARYDEPS)            @@\
  124.     $(RM) $@~                            @@\
  125.     LinkWithExports(libname,rev,solist,down,up)            @@\
  126.     $(RM) $@                             @@\
  127.     $(MV) $@~ $@                            @@\
  128.     @if $(SOSYMLINK); then (set -x; \                @@\
  129.       $(RM) Concat(lib,libname.so); \                @@\
  130.       $(LN) $@ Concat(lib,libname.so)); fi                @@\
  131.     LinkBuildLibrary($@)                        @@\
  132.     LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK))    @@\
  133.                                     @@\
  134. clean::                                    @@\
  135.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  136.  
  137. #endif /* SharedLibraryTarget */
  138.  
  139. /*
  140.  * SharedDepLibraryTarget - generate rules to create a shared library.
  141.  */
  142. #ifndef SharedDepLibraryTarget
  143. # define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up)    @@\
  144. AllTarget(Concat(lib,libname.so.rev))                    @@\
  145.                                     @@\
  146. Concat(lib,libname.so.rev):  deplist $(EXTRALIBRARYDEPS)        @@\
  147.     $(RM) $@~                            @@\
  148.     LinkWithExports(libname,rev,solist,down,up)            @@\
  149.     $(RM) $@                             @@\
  150.     $(MV) $@~ $@                            @@\
  151.     @if $(SOSYMLINK); then (set -x; \                @@\
  152.       $(RM) Concat(lib,libname.so); \                @@\
  153.       $(LN) $@ Concat(lib,libname.so)); fi                @@\
  154.     LinkBuildLibrary($@)                        @@\
  155.     LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK))    @@\
  156.                                     @@\
  157. clean::                                    @@\
  158.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  159.  
  160. #endif /* SharedDepLibraryTarget */
  161.  
  162. /*
  163.  * SharedDepCplusplusLibraryTarget - generate rules to create a shared library.
  164.  */
  165. #ifndef SharedDepCplusplusLibraryTarget
  166. #define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up) @@\
  167. AllTarget(Concat(lib,libname.so.rev))                    @@\
  168.                                     @@\
  169. Concat(lib,libname.so.rev):  deplist $(EXTRALIBRARYDEPS)        @@\
  170.     $(RM) $@~                            @@\
  171.     (cd down; $(CXX) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
  172.     $(RM) $@                             @@\
  173.     $(MV) $@~ $@                            @@\
  174.     @if $(SOSYMLINK); then (set -x; \                @@\
  175.       $(RM) Concat(lib,libname.so); \                @@\
  176.       $(LN) $@ Concat(lib,libname.so)); fi                @@\
  177.     LinkBuildLibrary($@)                        @@\
  178.     LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK))    @@\
  179.                                     @@\
  180. clean::                                    @@\
  181.     $(RM) Concat(lib,libname.so.rev)                
  182. #endif /* SharedDepCplusplusLibraryTarget */
  183.  
  184.  
  185. #ifndef SharedDepModuleTarget
  186. #define SharedDepModuleTarget(name,deps,solist)                @@\
  187. AllTarget(name)                                @@\
  188.                                     @@\
  189. name: deps                                @@\
  190.     $(RM) $@~                            @@\
  191.     SharedLibraryLdCmd -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) @@\
  192.     $(RM) $@                            @@\
  193.     $(MV) $@~ $@                            @@\
  194.                                     @@\
  195. clean::                                    @@\
  196.     $(RM) name
  197.  
  198. #endif /* SharedDepModuleTarget */
  199.  
  200.  
  201. /*
  202.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  203.  */
  204. #ifndef SharedLibraryDataTarget
  205. # define SharedLibraryDataTarget(libname,rev,salist)
  206. #endif /* SharedLibraryTarget */
  207.